package com.cuntian.rocketmq.consumer;


import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author 35371
 */
@Slf4j
@Component
@RocketMQMessageListener(
        topic = "cuntian-study-rocketmq",
        consumerGroup = "cuntian-springboot-rocketmq-string"
)
public class RocketMQConsumerString implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        log.info("cuntian-springboot-rocketmq-string 接受到的消息是 {}",message);
    }
}
